home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 May
/
CMCD0505.ISO
/
Software
/
Demo
/
DesktopX
/
objects
/
ktekdockv1.dxpack
/
{2D767879-2136-4A66-A66A-D464C4424EC3}.DXScript2
< prev
next >
Wrap
Extensible Markup Language
|
2004-08-24
|
2KB
|
76 lines
<?xml version="1.0"?>
<!--DXScript Data File. Version 2.0-->
<DXScript>
<Script><![CDATA[Dim fading
fading=False
Dim txt
Dim faderate
Sub tooltip(sometxt)
Object.KillTimer 100'kill initiating timer
Object.KillTimer 150
If sometxt="hide" Then
Object_OnTimer200'start fading timer
Else
txt=sometxt
object.OnTop
Object.SetTimer 100,1000'wait 1 second then show text
End If
End Sub
Sub Object_OnTimer100'tooltip configured in this sub
If fading=False Then
DesktopX.Object(Object.Name&"text").Text=txt
Object.Sleep 50'give dx breathing space b4 it measures the text
Object.Width=DesktopX.Object(Object.Name&"text").Width+8
Object.Move System.CursorX-(Object.Width)/2,System.Cursory-24
If Object.Right>desktopx.Object("kbarback").Right Then Object.Right=desktopx.Object("kbarback").Right
If Object.Left<desktopx.Object("kbarback").Left Then Object.Left=desktopx.Object("kbarback").Left
If Object.Top<desktopx.Object("kbarback").Top Then Object.Top=desktopx.Object("kbarback").Top
Object.KillTimer 100'kill this timer
Object.SetTimer 150,25
End If
End Sub
Sub Object_OnTimer150'fade in tooltip
x=Object.Opacity
If x<100 Then
x=x+10
Object.Opacity=x
DesktopX.Object(Object.Name&"text").Opacity=x
Else
Object.KillTimer 150'stop timer once tooltip is revealed
Object.SetTimer 200,2000'begin fading tooltip after 2 seconds
End If
End Sub
Sub Object_OnTimer200'fade out tooltip
fading=True
Object.SetTimer 200,25'reset timing
x=Object.Opacity
If x>0 Then
x=x-10
Object.Opacity=x
DesktopX.Object(Object.Name&"text").Opacity=x
Else
Object.KillTimer 200'stop timer once tooltip has faded
fading=False
End If
End Sub
'Called when the script is executed
Sub Object_OnScriptEnter
'Object.Opacity=100
End Sub
'Called when the script is terminated
Sub Object_OnScriptExit
End Sub
]]></Script><Globals><Editor><PropPane>0</PropPane><EditorLeft>183</EditorLeft><EditorTop>47</EditorTop><EditorRight>1243</EditorRight><EditorBottom>850</EditorBottom></Editor><Object><LanguageCLSID>{B54F3741-5B07-11CF-A4B0-00AA004A55E8}</LanguageCLSID><ControlCLSID>{00000000-0000-0000-0000-000000000000}</ControlCLSID><ControlObjWidth>64</ControlObjWidth><ControlObjHeight>64</ControlObjHeight><RunState>1</RunState><ManualControlLoad>0</ManualControlLoad><ScriptHostVersion>2</ScriptHostVersion></Object></Globals></DXScript>